home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / pwr14k.zip / MENU1.PWR < prev    next >
Text File  |  1991-05-08  |  2KB  |  44 lines

  1. Variable      FColor,1                  ;store the current screen colors
  2. Variable      BColor,1
  3. Variable      ColorAttr,1
  4. Variable      MenuSel,1
  5. ?Color        FColor,BColor,ColorAttr
  6. Label         ShowMenu
  7. Clear         112                       ;clear screen to a new color
  8. Center        "Demonstration Menu",2    ;center on line 2
  9. WriteAt       10,4,"A. Run a directory and return"
  10. WriteAt       10,6,"B. Run BoxDemo and return (DOS batch + PowerBatch + return)"
  11. WriteAt       10,8,"C. Reboot your system"
  12. WriteAt       10,10,"E. Exit this menu and return to DOS"
  13. Label         GetInp
  14. WriteAt       15,13,"Enter your choice :"
  15. GoToXY        34,13
  16. ReadUpKey     MenuSel                   ;get users selection
  17. Compare       MenuSel,"A",ChekB,Error   ;compare selection to A
  18. Clear         7,0                       ;clear screen to fore 7, back 0
  19. dir           "/w"                      ;run DOS dir command with /w parm
  20. Wait          30                        ;wait 3 secs for show
  21. GoTo          ShowMenu                  ;redisplay menu
  22. Label         ChekB
  23. Compare       MenuSel,"B",ChekC,Error   ;compare selection to B
  24. Clear         15                        ;clear screen to attribute 15
  25. DOSEX1                                  ;run a DOS batch file, then PowerBatch
  26. GoTo          ShowMenu                  ;redisplay menu
  27. Label         ChekC
  28. Compare       MenuSel,"C",ChekE,Error   ;compare selection to C
  29. Boot                                    ;perform a warm boot
  30. Label         ChekE
  31. Compare       MenuSel,"E",Error,Error   ;compare selection to E
  32. Clear         ColorAttr                 ;restore original color
  33. Halt                                    ;end the PowerBatch program
  34. Label         Error                     ;come here for errors
  35. Blink                                   ;reverse the colors
  36. WriteAt       5,20,"InCorrect menu selection...Try again."
  37. Beep          750,5                     ;beep at 750 hz for half sec
  38. Wait          30                        ;wait 3 secs to see msg
  39. Normal                                  ;restore text attributes
  40. ClearLine     20                        ;clear the message line
  41. GoToXY        34,13                     ;erase the incorrect entry
  42. Write         " "
  43. GoTo          GetInp                    ;get new menu selection
  44.